package cn.yusei.teamTribe.constant;

import java.lang.reflect.Field;

public class UsernameType {
	
	public static final int USERNAME = 0;
	
	public static final int EMAIL = 1;
	
	public static final int PHONE = 2;

	private static Field[] fields = UsernameType.class.getFields();
	
	public static boolean isUsernameType(int usernameType)
	{
		for(Field field : fields)
		{
			try
			{
				if(field.getInt(UsernameType.class) == usernameType)
					return true;
			}
			catch (Exception e)
			{
				e.printStackTrace();
			}
		}
		return false;
	}
	
}
